﻿<!DOCTYPE html>
<?php 
include_once '../check1.php';
?>
<html>
<head>
<meta charset="utf-8" />
<title><?=gv($info_copy,"title");?></title>
<link href="images/index_style.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="/static/css/backend.css?0829" />
<script src="http://libs.baidu.com/jquery/1.8.3/jquery.min.js"></script></head>
<body>
<!--head-->
<div class="head">
<div class="head_con">
          <span class="logo">
            <a href="#"><img src="images/logo.jpg" height="67" width="389"> </a>
          </span>
          <span class="title">
            <img src="images/title.jpg" height="78" width="215"> 
          </span>
     </div>
     <div class="head_bottom_bg"></div>
</div>
<div class="main index_main">
     <div class="left">
          <div class="left_t">
               <img src="images/left_img.png"><br>
               <a href="/user/main.php">用户中心首页</a>
          </div>
          <ul>
             <li>
                <a href="/user/item.php" class="cpjwa1_select">
                 产品及文案
                </a>
             </li>
             <li>
                <a href="/user/order.php" class="cpjwa2">
                 订单与结算
                </a>
             </li>
             <li>
                <a href="/user/invite.php" class="cpjwa3">
                 邀请与奖励
                </a>
             </li>
             <li>
                <a href="/user/channelList.php" class="cpjwa4">
                 我的公众账号
                </a>
             </li>
             <li>
                <a href="/user/user_detail.php" class="cpjwa5">
                 我的信息
                </a>
             </li>
             <li>
                <a href="/user/terms.php" class="cpjwa7">
                 服务条款
                </a>
             </li>
              <li>
                <a href="../control.php?oper=loginout" class="cpjwa6">
                 退出登录
                </a>
             </li>
          </ul>
     </div>
    
<?php 
$id=$_GET["id"];
$res=sql("s", "product", "*", "where id=".$id);
$res3=sql("s", "user", "*", "where user='".$user."'");
$info3=firstrow($res3);
$user_id=gv($info3, "id");
$info=firstrow($res);
?>
<div class="right">
     <div class="right_con">
             商品详情
     </div>
	 <div class="right_con1">
           <a href="/user/item.php">返回商品列表</a><a href="http://<?=$_SERVER['HTTP_HOST'];?>/user/buy.php?r=<?=$id;?>-<?=$user_id;?>" target="_blank" class="right_con1_b">录单</a>
     </div>
	 <div class="spxq_con">
                <div class="spxq_con_a">
                     <p class="spxq_con_a_1">商品名称</p>
                     <p class="spxq_con_a_2"><?=gv($info,'name');?></p>
                </div>
				<div class="spxq_con_b">
                  <h2>商品信息</h2> 
                     <div class="spxq_con_b_1">
                       <img src="../uploade/<?=gv($info,"sptu");?>" width="320" /><br /><?=gv($info,"tgsm");?></div> 	
                </div>
				<div class="spxq_con_b">
                 <h2>商品SKU</h2>
                  <div class="spxq_con_b_2">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr style="font-size:16px;">
                        <td width="294" height="35" class="xiayou">销售SKU</td>
                        <td width="133" height="35" class="xiayou">价格</td>
                        <td width="136" height="35" class="xia">分成</td>
                      </tr>
    					<?php 
$suk=explode("-|-", gv($info,"suk"));
$jg=explode("-|-", gv($info,"jg"));
$fc=explode("-|-", gv($info,"fc"));
for ($i=1;$i<count($suk);$i++){
	echo '<tr><td height="35" class="xiayou">'.$suk[$i].'</td><td height="35" class="xiayou">'.$jg[$i].'元</td><td height="35" class="xia">'.$fc[$i].'元</td></tr>';
}
?>
                     </table>
                  </div>
             </div>
             <div class="spxq_con_b">
               <h2>推广渠道</h2>
               <div class="spxq_con_b_3">
                    
                          <table width="100%" border="0" cellspacing="0" cellpadding="0">
                              <tr>
                                <td width="180" height="34"><label for="select"></label>
                                  <select style="width:150px" id="CH" onChange="setLink(this)">
									<option value="">不设置渠道</option>
									<?php 
										$res4=sql("s", "channel", "*", "where user='".$user."'");
										if ($res4) {
											foreach ($res4 as $info4){
											echo '<option  value="'.gv($info4,"id").'">'.gv($info4,"name").'</option>';
											}
										}
									?>
									</select></td>
                                <td width="153" style="font-size:16px;"><a class="btn" href="/user/addchannel.php">新增推广渠道</a>&nbsp;&nbsp;</td>
                                <!--<form action="" method="get">
                                <td width="180"><label for="textfield"></label>
                                <input type="text" ph="渠道名称" id="name" class="spxq_textbox1 xialak"/></td>
                                <td width="86">
                                <a onClick="addCh()" class="zc_anniu">增&nbsp;加</a>
                                </td>
                                </form>-->
                            </tr>
                              <tr>
                                <td height="38" colspan="4">* 可选项，设置推广渠道后可按推广渠道统计订单，以分析或对比渠道的推广效果</td>
                            </tr>
                      </table>

                 
               </div>
             </div>
			 <div class="spxq_con_b spxq_con_b_5">
                <h2>模式一<i class="spxq_con_b_4_top">直接下单</i></h2>
                <div class="spxq_con_b_4">
                     <form action="" method="get">
                           <table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td height="34">阅读原文链接：</td>
                        <td height="34">&nbsp;</td>
                      </tr>
                      <tr>
                        <td width="431" height="34"><label for="textfield2"></label>
                        <input id="link1" readonly style="width:400px" type="text" value="http://<?=$_SERVER['HTTP_HOST'];?>/user/buy.php?r=<?=$id;?>-<?=$user_id;?>" onFocus="$(this).select()"  class="spxq_textbox3 xialak" />
                   		<input id="link2" readonly style="width:400px" type="hidden" value="http://<?=$_SERVER['HTTP_HOST'];?>/user/buy.php?r=<?=$id;?>-<?=$user_id;?>" onFocus="$(this).select()" />
                        </td>
                        <td height="34"><font color="#FF0000">阅读全文要与此链接一模一样</font></td>
                      </tr>
                      <tr>
                        <td width="391" height="50" style="padding-left:40px;"><font color="#FF0000">编辑图文信息完先预览，手机下测试订单，成功再推广</font>
                        </td>
                        <td height="34"></td>
                      </tr>
                      <tr>
                        <td height="34">宣传文案：</td>
                        <td height="34">&nbsp;</td>
                      </tr>
                                             <tr>
                        <td height="34" colspan="2">1. <a target="_blank"  class="acolhei" href="<?=gv($info,'url');?>"><?=gv($info,'title');?></a>
</td>
                        </tr>
                                            
                    </table>

                  </form>
                </div>
             </div>



</div></div>
</div>
<script>
var iid=12563,uid=1199;
function setLink(o) {
	document.getElementById("link1").value=document.getElementById("link2").value+"&chan="+document.getElementById("CH").value;
}
function addCh() {
	var name=$.trim($('#name').val());
	if(name == '' || name == '渠道名称') {
		alert('请填写渠道名称！');
		$('#name').focus();
		return false;
	}
	$.post("/user/addCh", {name:name}, function(id){
		$('#CH').append('<option selected value="'+id+'">'+name+'</option>');
		$('#name').val('');
		setLink($('#CH'));
		alert('新增推广平台已设置成功！');
	});
}
$(document).ready(function(){
ph('channel');
});
</script>

<!--foot-->
<div class="foot">
     <div class="foot_con">
          <div class="foot_con_a">
               <a href="http://cps.weiqun100.com/user/main.php">用户中心</a>
                <a href="http://cps.weiqun100.com/tp/3/info/gsjj/gsjj.html">公司简介</a>
               <a href="http://cps.weiqun100.com/tp/3/info/fclc/fclc.html">分成流程</a>
                <a href="http://cps.weiqun100.com/tp/3/info/zytz/zytz.html">重要通知</a>
               <a href="http://cps.weiqun100.com/tp/3/info/zprc/zprc.html">招聘人才</a>
                <a href="http://cps.weiqun100.com/tp/3/info/kfzx/kfzx.html">客服中心</a>
                <a href="http://cps.weiqun100.com/tp/3/info/lxwml/lxwml.html" class="boder_right">联系我们</a>
          </div>   
          <?=gv($info_copy,"copyright");?>
     </div>
     
</div>
<!--在线客服-->
<div class="fixedBox">
  <UL class="fixedBoxList">
    <LI style="display: block;" id="cartboxs" class="fixeBoxLi cart_bd">
      <P class="good_cart">0</P>
      <span class="fixeBoxSpan"></span> <strong>投诉意见</strong>
      <div class="cartBox">
        <div class="bjfff"></div>
        <div class="contactManager_box contactManager" id="cm_more">
  <!--[if IE 6]>
  <iframe src="about:blank" frameborder="0"></iframe>
  <![endif]-->
  <table>
    <tr class="contactManager_title">
      <td>
        <img src="../tp/3/images/icon_manager.jpg" alt="微分销" />
        <span>微分销</span>
      </td>
    </tr>

      <tr>
          <td>
             <a href="http://wpa.qq.com/msgrd?v=3&uin=<?=gv($home,"qq")?>&site=qq&menu=yes" target="_blank" alt="点击这里给我发消息" title="点击这里给我发消息">
          <img src="../tp/3/images/icon_qq.jpg" alt="QQ" />
          <span><?=gv($home,"qq")?></span>
        </a>
          </td>
      </tr>
    <tr>
      <td>
        <img src="../tp/3/images/icon_mobile.jpg" alt="手机号码" />
        <span><?=gv($home,"tel")?></span>
      </td>
    </tr>
    
    <tr>
      <td>
      <a title="交流群" >
        <img src="../tp/3/images/icon_qq.jpg" alt="群" />
        <span>QQ群：<?=gv($home,"qun")?></span>
      </a>
      </td>
    </tr>
  </table>

        </div>
      </div>
    </LI>
    <LI class="fixeBoxLi Home"> <A href="../index.html"> <span class="fixeBoxSpan"></span> <strong>返回首页</strong> </A> </LI>
    <LI class="fixeBoxLi BackToTop"> <span class="fixeBoxSpan"></span> <strong>返回顶部</strong> </LI>
  </UL>
</div>

<div style="display:none;">
			<!--放置客服代码-->
</div>

<script src="images/lanrenzhijia.js"></script>

<script src="/static/js/j.js?0829"></script>
</body>
</html>